package vfs.obj.association;

import vfs.filter.VFSFilter;
import vfs.obj.entity.VFSGroup;
import vfs.obj.entity.VFSNode;
import java.util.Iterator;

/**
 * VFSNodeWritableByGroup is an association manipulator capable of 
 * manipulating the "writable by" relationship between Nodes and Groups.
 * 
 * @author Matthew Eavenson <durandal@uga.edu>
 */
public interface VFSNodeWritableByGroup{
    
    /**
     * Returns an iterator over all nodes writable by a specified group,
     * and filtered by a specified filter.
     * 
     * @param group the group that can write the requested nodes
     * @param filter a filter over the nodes writable by the specified group
     * @return an iterator over any matching nodes
     */
    Iterator<VFSNode> getNodes(VFSGroup group, VFSFilter filter);
    
    /**
     * Returns the write group of a specified node.
     * 
     * @param node the node whose write group is requested
     * @return the write group of the specified node
     */
    VFSGroup getGroup(VFSNode node);
    
    /**
     * Sets the write group of a specified node to a specified group.
     * 
     * @param node the node whose write group will be set
     * @param group the group to set as the write group of the specified node
     */
    void setGroup(VFSNode node, VFSGroup group);
    
}
